package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.TermDao;
import pojo.Term;
import service.TermManager;


@Service
public class TermManagerImpl implements TermManager {

	@Autowired
	private TermDao termDao;
	
	@Transactional
	@Override
	public Term addInfo(Term info) {
		
		return termDao.addInfo(info);
	}

	@Transactional
	@Override
	public void addInfoList(List<Term> infoList) {
		
		termDao.addInfoList(infoList);
		
	}
	
	@Transactional
	@Override
	public Term getResult(Term param) {
		
		return termDao.getResult(param);
	}

	@Transactional
	@Override
	public List<Term> getResults(String like) {

		return termDao.getResults(like);
	}

	@Transactional
	@Override
	public boolean updateInfo(Term info) {
		
		return termDao.updateInfo(info);
	}

	@Transactional
	@Override
	public boolean deleteInfo(Term info) {
		
		return termDao.deleteInfo(info);
	}

}
